package com.springboot.ww.platform.pd.lms.api;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2024-07-21 17:06
 */
@NoArgsConstructor
@Data
public class PdSizeChartsDTO {

    @JsonProperty("contentDTO")
    private ContentDTODTO contentDTO;
    @JsonProperty("classId")
    private Integer classId;
    @JsonProperty("supplierId")
    private Long supplierId;
    @JsonProperty("businessId")
    private Long businessId;
    @JsonProperty("name")
    private String name;
    @JsonProperty("reusable")
    private Object reusable;
    @JsonProperty("updatedAt")
    private Long updatedAt;

    @NoArgsConstructor
    @Data
    public static class ContentDTODTO {
        @JsonProperty("records")
        private List<RecordsDTO> records;
        @JsonProperty("meta")
        private MetaDTO meta;

        @NoArgsConstructor
        @Data
        public static class MetaDTO {
            @JsonProperty("elements")
            private List<ElementsDTO> elements;
            @JsonProperty("groups")
            private List<GroupsDTO> groups;

            @NoArgsConstructor
            @Data
            public static class ElementsDTO {
                @JsonProperty("name")
                private String name;
                @JsonProperty("id")
                private Integer id;
            }

            @NoArgsConstructor
            @Data
            public static class GroupsDTO {
                @JsonProperty("name")
                private String name;
                @JsonProperty("id")
                private Integer id;
            }
        }

        @NoArgsConstructor
        @Data
        public static class RecordsDTO {
            @JsonProperty("values")
            private Map<String,String> values;
        }
    }
}
